package de.lang.rollo.controller.ressources;


import de.lang.rollo.controller.logic.GPIOFacade;
import de.lang.rollo.controller.model.RolloEvent;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


@Path("/v1/rollo/access/")
public class RolloAccessRessource {
	private static Logger logger = LoggerFactory.getLogger(RolloAccessRessource.class);
	
	GPIOFacade gpio;
	
	public RolloAccessRessource(GPIOFacade gpio) {
		this.gpio = gpio;
	}

	@GET
//	@Consumes(MediaType.APPLICATION_JSON)
	@Path("/toggle")
	public void toggle(RolloEvent event) {
		gpio.doSomeShit();
	}
	
	@GET
//	@Consumes(MediaType.APPLICATION_JSON)
	@Path("/blink")
	public void blink(RolloEvent event) {
		gpio.blink();
	}

}
